package com.security.feign;

import com.security.entity.User;
import com.security.entity.UserInfo;
import com.security.feign.fallback.TestFallBack;
import com.security.feign.fallback.UserClientFallback;
import com.security.vo.UserOauthVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author cici
 */
@FeignClient(value = "user-service", fallback = UserClientFallback.class)
public interface ITestUserClient {

    String USER_INFO = "/user/info";

    String USER_INFO_BY_PHONE = "/query/info";

    String INSERT_MINI_INFO = "/insert/info";

    @GetMapping(USER_INFO)
    UserInfo uInfo(@RequestParam("account") String account);

    @GetMapping(USER_INFO_BY_PHONE)
    UserInfo queryUserInfoByUsername(@RequestParam("phone") String phone);

    @GetMapping(INSERT_MINI_INFO)
    UserOauthVO insertMiniUserByJson(@RequestParam("wxJson")String wxJson,@RequestParam("openId") String openId);
}
